package com.tiancheng.onecode.trade.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Auther: 李凯伦
 * @Date: 2021/03/17 15:52
 * @Description: 核销状态
 */
@Getter
@AllArgsConstructor
public enum VerificationStatusEnum {
    WAIT("WT", "待核销"),
    IN("IN", "核销中"),
    SC("SC", "核销成功"),
    FL("FL", "核销失败"),
    ;

    private String code;
    private String desc;

    public static String getDesc(String code) {
        VerificationStatusEnum[] verificationStatusEnums = values();
        for (VerificationStatusEnum statusEnum : verificationStatusEnums) {
            if (statusEnum.getCode().equals(code)) {
                return statusEnum.getDesc();
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
